package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.PurchaseOrderMapper;
import com.ruoyi.order.domain.PurchaseOrder;
import com.ruoyi.order.service.IPurchaseOrderService;

/**
 * 订单管理Service业务层处理
 * 
 * @author yx
 * @date 2024-12-19
 */
@Service
public class PurchaseOrderServiceImpl implements IPurchaseOrderService 
{
    @Autowired(required = false)
    private PurchaseOrderMapper purchaseOrderMapper;

    /**
     * 查询订单管理
     * 
     * @param orderId 订单管理主键
     * @return 订单管理
     */
    @Override
    public PurchaseOrder selectPurchaseOrderByOrderId(Integer orderId)
    {
        return purchaseOrderMapper.selectPurchaseOrderByOrderId(orderId);
    }

    /**
     * 查询订单管理列表
     * 
     * @param purchaseOrder 订单管理
     * @return 订单管理
     */
    @Override
    public List<PurchaseOrder> selectPurchaseOrderList(PurchaseOrder purchaseOrder)
    {
        return purchaseOrderMapper.selectPurchaseOrderList(purchaseOrder);
    }

    /**
     * 新增订单管理
     * 
     * @param purchaseOrder 订单管理
     * @return 结果
     */
    @Override
    public int insertPurchaseOrder(PurchaseOrder purchaseOrder)
    {
        return purchaseOrderMapper.insertPurchaseOrder(purchaseOrder);
    }

    /**
     * 修改订单管理
     * 
     * @param purchaseOrder 订单管理
     * @return 结果
     */
    @Override
    public int updatePurchaseOrder(PurchaseOrder purchaseOrder)
    {
        return purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
    }

    /**
     * 批量删除订单管理
     * 
     * @param orderIds 需要删除的订单管理主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderByOrderIds(Integer[] orderIds)
    {
        return purchaseOrderMapper.deletePurchaseOrderByOrderIds(orderIds);
    }

    /**
     * 删除订单管理信息
     * 
     * @param orderId 订单管理主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderByOrderId(Integer orderId)
    {
        return purchaseOrderMapper.deletePurchaseOrderByOrderId(orderId);
    }
}
